#ifndef ROLESCENE_H_20120606
#define ROLESCENE_H_20120606

#include "cocos2d.h"
#include "InlineFunc.h"
#include "NetworkDelegate.h"
#include "CocosUI/CocosUI.h"

enum RoleUI
{
	ROLE_BTN_ROLE1,
	ROLE_BTN_ROLE2,
	ROLE_BTN_ROLE3,
	ROLE_BTN_MALE,
	ROLE_BTN_FEMALE,
	ROLE_BTN_OK,
	ROLE_INPUT_NAME,
	ROLE_CHECKBOX_TYPE,
	ROLE_CHECKBOX_SEX

};

enum RoleTag
{
	TAG_INPUT_NAME,
	TAG_CHECKBOX_TYPE,
	TAG_CHECKBOX_SEX
};
class CRoleScene : public cocos2d::CCLayer, public CGameDelegate, CUIListener
{
public:
	LAYER_NODE_FUNC(CRoleScene);
	LAYER_SHOW_FUNC(CRoleScene);

	bool init();
	void onEnter();
	void Tick(cocos2d::ccTime dt);

	virtual void onReceiveMsg(int aID, int event = 0, const void *pData = NULL);
	virtual void createNameRepeat();
	virtual void loginRegionBack(bool bSuccess);

private:
	CServerHelper          *m_pServer;
	cocos2d::CCSprite      *m_pSprBack;
	cocos2d::CCSprite      *m_pSprRoles[6];

	CCocosTipBox           *m_pTipBox;

	int m_typeNum;
	int m_sexNum;
};
#endif